package main

import (
	_ "database/sql/driver"
	"github.com/gin-gonic/gin"
	//"github.com/spf13/viper"
	"gorm.io/gorm"
	//"os"
	"testt/common"
	"testt/routers"
	"testt/middleWare"
	//"testt/config"
)

var db *gorm.DB
func main() {
//	InitConfig()
	db = common.InitDB()
	r := gin.Default()
	r.Use(middleWare.Cors()) //跨域!!!!!!!!
	r = routers.CollectRoute(r)
	panic(r.Run())// listen and serve on 0.0.0.0:8080
}


// import(
// 	"fmt"
// )

// func main(){
// 	fmt.Println("hello")
// }